package com.fs.spring.example01;

import org.apache.commons.lang3.ArrayUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;

/**
 * @author shuai.fang
 * @date：2017-08-03
 * @description：
 */
public class MyBeanFactoryPostProcessor implements BeanFactoryPostProcessor {

	private static Logger logger = LoggerFactory.getLogger(MyBeanFactoryPostProcessor.class);

	public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
		logger.info("beanFactory -> {}", beanFactory);
		logger.info("beanFactory names -> {}", ArrayUtils.toString(beanFactory.getBeanDefinitionNames()));
		logger.info("BeanFactoryPostProcessor#postProcessBeanFactory");
	}

}
